<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue计算与setter</title>
</head>

<body>
<div id="app">

    <div v-html>
        {{numberAdd}}
        {{numberAdd}}
    </div>
</div>

<script src="../js/vue.js"></script>
<script>

    const message = {
        text1 : "文本前缀<br>",
        text2 : "文本内容<br>",
        text3 : "文本后缀<br>",
    };

    //数据冻结, 禁止调试
    //Object.freeze(message)

    const demo = new Vue({
        el: '#app',
        data: message,
        methods: {},
        computed: {
            numberAdd : function(){
                console.log("numberAdd方法执行了")
                return this.text1 + this.text2 + this.text3;
            }

        }
    });
</script>
</body>
</html>